Add generic interface for SSM inference - #5382
Conversation
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
562ab67 to
87f2871
Compare
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test 74becf4 |
NeMo-RL functional testsmcore sha:
No failure in this suite is attributable to this PR. L1 was fully blocked for every PR by a Megatron-Bridge break: Megatron-LM#5865 turned The one remaining failure, L2 has not been run yet. Posted by the nemo-rl-testing-agent. Re-runs edit this comment in place. |
|
/ok to test eb01b68 |
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test 83e1849 |
|
/ok to test 8884612 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/31275604068 |
GDP's in_proj.weight is GTP-sliced along axis 0 with alignment padding; the [z|V*|K*|Q|b*|a] split boundaries don't line up with GTP slice boundaries, so sharded_state_dict all-gathers the shards back to TP-local size (stripping pad rows) and falls through to the non-GTP split path -- the saved checkpoint matches a non-GTP run. On load, the factory merge_fn re-pads and re-slices per gtp_remat rank, mirroring _gtp_slice_one_param. (squashed cherry-pick of unmerged PR NVIDIA#6503 @ 04fc214, adapted to the pre-NVIDIA#6443 GDP file: NVIDIA#6443/NVIDIA#5382 (dynamic-inference SSM interface) are not carried, so the import block keeps is_using_quantization_scales)
What does this PR do ?
Makes the following refactoring changes (no functionality changes):
ssm_inference.pyssm_decodeandssm_prefillinterface functions_static_decodeand_static_prefillfunctions.Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.